package kr.saeildamil.androidstudy.ch06;

import kr.saeildamil.androiddforstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

public class InflationEX extends Activity {
		@Override
		protected void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			
			/*LinearLayout layout = new LinearLayout(this);
			layout.setOrientation(LinearLayout.VERTICAL);
			layout.setBackgroundColor(Color.LTGRAY);
			
			TextView tv = new TextView(this);
			tv.setText("TextView");
			tv.setGravity(Gravity.CENTER);
			tv.setTextColor(Color.RED);
			tv.setTextSize(20);
			
			layout.addView(tv);
			
			//
			
			/*LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			
			LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.inflation, null);
			
			
			//
			
			/*LayoutInflater inflater = LayoutInflater.from(this);
			LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.inflation, null); */
			
			LinearLayout layout = (LinearLayout) View.inflate(this, R.layout.inflation, null);
			
			setContentView(layout);
		
		}

}
